package cn.gson.oasys.model.entity.process;

import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import cn.gson.oasys.model.entity.user.User;

@Table
@Entity(name="aoa_advancepay")
//费用报销表
public class Advancepay {

  @Id
  @Column(name="advancepay_id")
  @GeneratedValue(strategy=GenerationType.IDENTITY)
  private Long advancepayId;

  @Column(name="collection_compnay")
  private String collectionCompnay;//收款单位名称

  @Column(name="invoice_compnay")
  private String invoiceCompnay;//开票单位名称

  @Column(name="pay_money")
  private Double payMoney; //金额

  @Column(name="advancepay_money")
  private Double advancepayMoney; //预付款金额


  @Column(name="uppercase")
  private String uppercase;//金额大写

  public String getInvoiceCompnay() {
    return invoiceCompnay;
  }

  public void setInvoiceCompnay(String invoiceCompnay) {
    this.invoiceCompnay = invoiceCompnay;
  }

  public Double getPayMoney() {
    return payMoney;
  }

  public void setPayMoney(Double payMoney) {
    this.payMoney = payMoney;
  }

  public Double getAdvancepayMoney() {
    return advancepayMoney;
  }

  public void setAdvancepayMoney(Double advancepayMoney) {
    this.advancepayMoney = advancepayMoney;
  }

  public String getUppercase() {
    return uppercase;
  }

  public void setUppercase(String uppercase) {
    this.uppercase = uppercase;
  }

  public String getUsefull() {
    return usefull;
  }

  public void setUsefull(String usefull) {
    this.usefull = usefull;
  }

  @Column(name="usefull")
  private String usefull;//用途

  @Column(name="type_id")
  private Long typeId;//报账单类型（发票、实物收据、提货单、送货单、发货单、运单）
	
	/*public String getOperationName() {
		return operationName;
	}
	
	public void setOperationName(String operationName) {
		this.operationName = operationName;
	}
	
	@Column(name="operation_name")
	private String operationName;//审核人*/

  @OneToOne
  @JoinColumn(name="operation_name")
  private User operation;//报销人员

  @Override
  public String toString() {
    return "Advancepay{" +
        "advancepayId=" + advancepayId +
        ", collectionCompnay='" + collectionCompnay + '\'' +
        ", invoiceCompnay='" + invoiceCompnay + '\'' +
        ", payMoney=" + payMoney +
        ", advancepayMoney=" + advancepayMoney +
        ", uppercase='" + uppercase + '\'' +
        ", usefull='" + usefull + '\'' +
        ", typeId=" + typeId +
        ", operation=" + operation +
        ", managerAdvice='" + managerAdvice + '\'' +
        ", financialAdvice='" + financialAdvice + '\'' +
        ", coManagerAdvice='" + coManagerAdvice + '\'' +
        ", chairmanAdvice='" + chairmanAdvice + '\'' +
        ", username='" + username + '\'' +
        ", proId=" + proId +
        '}';
  }

  @Column(name="manager_advice")
  private String managerAdvice;//经理意见及说明

  @Column(name="financial_advice")
  private String financialAdvice;//财务部意见及说明

  public String getCoManagerAdvice() {
    return coManagerAdvice;
  }

  public void setCoManagerAdvice(String coManagerAdvice) {
    this.coManagerAdvice = coManagerAdvice;
  }

  public String getChairmanAdvice() {
    return chairmanAdvice;
  }

  public void setChairmanAdvice(String chairmanAdvice) {
    this.chairmanAdvice = chairmanAdvice;
  }

  @Column(name="co_manager_advice")
  private String coManagerAdvice;//总经理意见及说明

  @Column(name="chairman_advice")
  private String chairmanAdvice;//董事长意见及说明


  @Transient
  private String username;//审核人员

  @OneToOne(cascade=CascadeType.ALL)
  @JoinColumn(name="pro_id")
  private ProcessList proId;


  public String getCollectionCompnay() {
    return collectionCompnay;
  }
  public void setCollectionCompnay(String collectionCompnay) {
    this.collectionCompnay = collectionCompnay;
  }

  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

  public Long getAdvancepayId() {
    return advancepayId;
  }

  public void setAdvancepayId(Long advancepayId) {
    this.advancepayId = advancepayId;
  }

  public Long getTypeId() {
    return typeId;
  }

  public void setTypeId(Long typeId) {
    this.typeId = typeId;
  }

  public User getOperation() {
    return operation;
  }

  public void setOperation(User operation) {
    this.operation = operation;
  }

  public String getManagerAdvice() {
    return managerAdvice;
  }

  public void setManagerAdvice(String managerAdvice) {
    this.managerAdvice = managerAdvice;
  }

  public String getFinancialAdvice() {
    return financialAdvice;
  }

  public void setFinancialAdvice(String financialAdvice) {
    this.financialAdvice = financialAdvice;
  }

  public ProcessList getProId() {
    return proId;
  }

  public void setProId(ProcessList proId) {
    this.proId = proId;
  }

}
